package com.cos.feign.api;

import com.cos.commons.R;
import com.cos.vo.AddressEntity;
import com.cos.vo.Customer;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "address" ,path = "/address")
public interface AddressFeign {
    /**
     * 列表
     */
    @RequestMapping("/list")
    public List<AddressEntity> list(@RequestParam("uid") Integer uid);

    /**
     * 保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody AddressEntity address);

    @RequestMapping("/getAddressById")
    AddressEntity getAddressById(@RequestParam("id") Integer addressId);
}
